import React from 'react';
import { Notebook } from '../../types/index';
import styles from './Review.module.css';

/* 继续复习组件，props如下：
-otherNotebooks，Notebook[]，其他笔记本数据
-onSelectNotebook，函数，点击笔记本后的处理逻辑
*/
interface ContinueReviewProps {
  otherNotebooks: Notebook[];
  onSelectNotebook: (id: string) => void;
}

const ContinueReview: React.FC<ContinueReviewProps> = ({ 
  otherNotebooks, 
  onSelectNotebook 
}) => (
  <div className={styles.continueReview}>
    <p>还有其他笔记本需要复习：</p>
    <div className={styles.notebookList}>
      {otherNotebooks.map(notebook => (
        <button
          key={notebook.id}
          className={styles.btnPrimary}
          onClick={() => onSelectNotebook(notebook.id)}
        >
          {notebook.name}
        </button>
      ))}
    </div>
  </div>
);

export default ContinueReview; 